package Day34.集合类;

import java.util.LinkedList;

public class LinkedListDemo {
    public static void main(String[] args) {
        //创建LinkedList对象
        LinkedList<String> linkedList = new LinkedList<>();
        //向集合中插入数据
        linkedList.add("aaa");
        linkedList.add("bbb");
        System.out.println(linkedList);
        linkedList.addFirst("xxx");
        linkedList.addLast("yyy");
        linkedList.add(2,"ooo");
        System.out.println(linkedList);


    }
}
